refactor: replace context.TODO() with context.Background() and harden CI/CD - #26
Merged
Merged
Conversation
… CI/CD - Replace all context.TODO() calls in production and test code with context.Background() or proper context propagation - Enable shadow and nilness govet linters; re-enable select staticcheck checks (SA4006, S1011, S1034) - Fix CI coverage threshold comment (50% -> 60%) - Extract markdownlint config to .markdownlint-cli2.jsonc - Pin actions/setup-go to SHA in setup-deps and hawk actions - Change setup-deps default branch from dev to main - Add tracking issue references to all t.Skip() calls
This commit resolves all 145 golangci-lint issues that surfaced when the shadow, nilness, and additional staticcheck checks were enabled: - 142 shadow (govet): renamed inner shadowed variables to context-specific names (statErr, writeErr, unmarshalErr, etc.) - 22 model/provider shadows: renamed to modelName/providerName - 2 nilness tautologies (non-nil != nil): removed redundant nil checks - 1 staticcheck SA4006 (unused value): removed dead assignment No function signatures, exported types, or behavior changed. No linters were disabled or skipped. .golangci.yml is unchanged. Build and lint pass cleanly. The CI lint check on PR #26 will now pass.
Patel230
added a commit
that referenced
this pull request
Jun 12, 2026
* refactor: replace context.TODO() with context.Background() and harden CI/CD - Replace all context.TODO() calls in production and test code with context.Background() or proper context propagation - Enable shadow and nilness govet linters; re-enable select staticcheck checks (SA4006, S1011, S1034) - Fix CI coverage threshold comment (50% -> 60%) - Extract markdownlint config to .markdownlint-cli2.jsonc - Pin actions/setup-go to SHA in setup-deps and hawk actions - Change setup-deps default branch from dev to main - Add tracking issue references to all t.Skip() calls * refactor: centralize env access via internal/env package - Create internal/env/env.go with zero-dependency Getenv wrapper - Update config.Getenv to delegate to env.Getenv - Migrate os.Getenv calls across internal/ to env.Getenv or config.Getenv - Update AGENTS.md policy: env.Getenv for simple reads, config.EnvManager for profile/secret management - Add exceptions for runtime probes and telemetry * fix: resolve 145 golangci-lint shadow and nilness issues This commit resolves all 145 golangci-lint issues that surfaced when the shadow, nilness, and additional staticcheck checks were enabled: - 142 shadow (govet): renamed inner shadowed variables to context-specific names (statErr, writeErr, unmarshalErr, etc.) - 22 model/provider shadows: renamed to modelName/providerName - 2 nilness tautologies (non-nil != nil): removed redundant nil checks - 1 staticcheck SA4006 (unused value): removed dead assignment No function signatures, exported types, or behavior changed. No linters were disabled or skipped. .golangci.yml is unchanged. Build and lint pass cleanly. The CI lint check on PR #26 will now pass.
Patel230
added a commit
that referenced
this pull request
Jun 15, 2026
… CI/CD (#26) * refactor: replace context.TODO() with context.Background() and harden CI/CD - Replace all context.TODO() calls in production and test code with context.Background() or proper context propagation - Enable shadow and nilness govet linters; re-enable select staticcheck checks (SA4006, S1011, S1034) - Fix CI coverage threshold comment (50% -> 60%) - Extract markdownlint config to .markdownlint-cli2.jsonc - Pin actions/setup-go to SHA in setup-deps and hawk actions - Change setup-deps default branch from dev to main - Add tracking issue references to all t.Skip() calls * fix: resolve 145 golangci-lint shadow and nilness issues This commit resolves all 145 golangci-lint issues that surfaced when the shadow, nilness, and additional staticcheck checks were enabled: - 142 shadow (govet): renamed inner shadowed variables to context-specific names (statErr, writeErr, unmarshalErr, etc.) - 22 model/provider shadows: renamed to modelName/providerName - 2 nilness tautologies (non-nil != nil): removed redundant nil checks - 1 staticcheck SA4006 (unused value): removed dead assignment No function signatures, exported types, or behavior changed. No linters were disabled or skipped. .golangci.yml is unchanged. Build and lint pass cleanly. The CI lint check on PR #26 will now pass.
Patel230
added a commit
that referenced
this pull request
Jun 15, 2026
* refactor: replace context.TODO() with context.Background() and harden CI/CD - Replace all context.TODO() calls in production and test code with context.Background() or proper context propagation - Enable shadow and nilness govet linters; re-enable select staticcheck checks (SA4006, S1011, S1034) - Fix CI coverage threshold comment (50% -> 60%) - Extract markdownlint config to .markdownlint-cli2.jsonc - Pin actions/setup-go to SHA in setup-deps and hawk actions - Change setup-deps default branch from dev to main - Add tracking issue references to all t.Skip() calls * refactor: centralize env access via internal/env package - Create internal/env/env.go with zero-dependency Getenv wrapper - Update config.Getenv to delegate to env.Getenv - Migrate os.Getenv calls across internal/ to env.Getenv or config.Getenv - Update AGENTS.md policy: env.Getenv for simple reads, config.EnvManager for profile/secret management - Add exceptions for runtime probes and telemetry * fix: resolve 145 golangci-lint shadow and nilness issues This commit resolves all 145 golangci-lint issues that surfaced when the shadow, nilness, and additional staticcheck checks were enabled: - 142 shadow (govet): renamed inner shadowed variables to context-specific names (statErr, writeErr, unmarshalErr, etc.) - 22 model/provider shadows: renamed to modelName/providerName - 2 nilness tautologies (non-nil != nil): removed redundant nil checks - 1 staticcheck SA4006 (unused value): removed dead assignment No function signatures, exported types, or behavior changed. No linters were disabled or skipped. .golangci.yml is unchanged. Build and lint pass cleanly. The CI lint check on PR #26 will now pass.
Patel230
added a commit
that referenced
this pull request
Jun 18, 2026
… CI/CD (#26) * refactor: replace context.TODO() with context.Background() and harden CI/CD - Replace all context.TODO() calls in production and test code with context.Background() or proper context propagation - Enable shadow and nilness govet linters; re-enable select staticcheck checks (SA4006, S1011, S1034) - Fix CI coverage threshold comment (50% -> 60%) - Extract markdownlint config to .markdownlint-cli2.jsonc - Pin actions/setup-go to SHA in setup-deps and hawk actions - Change setup-deps default branch from dev to main - Add tracking issue references to all t.Skip() calls * fix: resolve 145 golangci-lint shadow and nilness issues This commit resolves all 145 golangci-lint issues that surfaced when the shadow, nilness, and additional staticcheck checks were enabled: - 142 shadow (govet): renamed inner shadowed variables to context-specific names (statErr, writeErr, unmarshalErr, etc.) - 22 model/provider shadows: renamed to modelName/providerName - 2 nilness tautologies (non-nil != nil): removed redundant nil checks - 1 staticcheck SA4006 (unused value): removed dead assignment No function signatures, exported types, or behavior changed. No linters were disabled or skipped. .golangci.yml is unchanged. Build and lint pass cleanly. The CI lint check on PR #26 will now pass.
Patel230
added a commit
that referenced
this pull request
Jun 18, 2026
* refactor: replace context.TODO() with context.Background() and harden CI/CD - Replace all context.TODO() calls in production and test code with context.Background() or proper context propagation - Enable shadow and nilness govet linters; re-enable select staticcheck checks (SA4006, S1011, S1034) - Fix CI coverage threshold comment (50% -> 60%) - Extract markdownlint config to .markdownlint-cli2.jsonc - Pin actions/setup-go to SHA in setup-deps and hawk actions - Change setup-deps default branch from dev to main - Add tracking issue references to all t.Skip() calls * refactor: centralize env access via internal/env package - Create internal/env/env.go with zero-dependency Getenv wrapper - Update config.Getenv to delegate to env.Getenv - Migrate os.Getenv calls across internal/ to env.Getenv or config.Getenv - Update AGENTS.md policy: env.Getenv for simple reads, config.EnvManager for profile/secret management - Add exceptions for runtime probes and telemetry * fix: resolve 145 golangci-lint shadow and nilness issues This commit resolves all 145 golangci-lint issues that surfaced when the shadow, nilness, and additional staticcheck checks were enabled: - 142 shadow (govet): renamed inner shadowed variables to context-specific names (statErr, writeErr, unmarshalErr, etc.) - 22 model/provider shadows: renamed to modelName/providerName - 2 nilness tautologies (non-nil != nil): removed redundant nil checks - 1 staticcheck SA4006 (unused value): removed dead assignment No function signatures, exported types, or behavior changed. No linters were disabled or skipped. .golangci.yml is unchanged. Build and lint pass cleanly. The CI lint check on PR #26 will now pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
context.TODO()calls in production and test code withcontext.Background()(validator, quality_gate, codegraph, chat_welcome, dx)shadowandnilnessgovet linters; re-enable select staticcheck checks (SA4006, S1011, S1034).markdownlint-cli2.jsonc(both hawk and eyrie)actions/setup-goto SHA in setup-deps and hawk actionsdevtomaint.Skip()calls lacking themContext
All changes address improvements identified during a comprehensive codebase review. These are safe refactors with no behavioral changes.